import request from '@/utils/request'

//管理员登录
export function adminLogin(data) {
  return request({
    url: '/api/admin/adminLogin',
    method: 'post',
    data,
  })
}
//管理员退出
export function adminLogout(data) {
  return request({
    url: '/api/admin/adminLogout',
    method: 'post',
    data,
  })
}

/*角色管理*/
//用户条件查询
export function userSelectBy(data) {
  return request({
    url: '/api/user/userSelectBy',
    method: 'post',
    data,
  })
}
//用户删除
export function userDeleteByIds(data) {
  return request({
    url: '/api/user/userDeleteByIds',
    method: 'post',
    data,
  })
}
//用户增加
// export function userDeleteByIds(data) {
//   return request({
//     url: '/api/user/userDeleteByIds',
//     method: 'post',
//     data,
//   })
// }
//用户修改
export function userUpdate(data) {
  return request({
    url: '/api/user/userUpdate',
    method: 'post',
    data,
  })
}
//管理员条件查询
export function adminSelectBy(data) {
  return request({
    url: '/api/admin/adminSelectBy',
    method: 'post',
    data,
  })
}
//管理员删除
export function adminDeleteByIds(data) {
  return request({
    url: '/api/admin/adminDeleteByIds',
    method: 'post',
    data,
  })
}
//管理员添加
export function adminAdd(data) {
  return request({
    url: '/api/admin/adminAdd',
    method: 'post',
    data,
  })
}
//管理员修改
export function adminUpdate(data) {
  return request({
    url: '/api/admin/adminUpdate',
    method: 'post',
    data,
  })
}

/*资讯管理*/
//资讯条件查询
export function newsSelectBy(data) {
  return request({
    url: '/api/news/newsSelectBy',
    method: 'post',
    data,
  })
}
//资讯删除
export function newsDeleteByIds(data) {
  return request({
    url: '/api/news/newsDeleteByIds',
    method: 'post',
    data,
  })
}
//资讯添加
export function newsAdd(data) {
  return request({
    url: '/api/news/newsAdd',
    method: 'post',
    data,
  })
}
//资讯修改
export function newsUpdate(data) {
  return request({
    url: '/api/news/newsUpdate',
    method: 'post',
    data,
  })
}

/*互助管理*/
//互助条件查询
export function helpSelectBy(data) {
  return request({
    url: '/api/help/helpSelectBy',
    method: 'post',
    data,
  })
}
//互助删除
export function helpDeleteByIds(data) {
  return request({
    url: '/api/help/helpDeleteByIds',
    method: 'post',
    data,
  })
}
//互助添加
export function helpAdd(data) {
  return request({
    url: '/api/help/helpAdd',
    method: 'post',
    data,
  })
}
//互助修改
export function helpUpdate(data) {
  return request({
    url: '/api/help/helpUpdate',
    method: 'post',
    data,
  })
}

/*相册管理*/
//相册条件查询
export function albumSelectBy(data) {
  return request({
    url: '/api/album/albumSelectBy',
    method: 'post',
    data,
  })
}
export function albumDeleteByIds(data) {
  return request({
    url: '/api/album/albumDeleteByIds',
    method: 'post',
    data,
  })
}
//相册添加
export function albumAdd(data) {
  return request({
    url: '/api/album/albumAdd',
    method: 'post',
    data,
  })
}
//相册修改
export function albumUpdate(data) {
  return request({
    url: '/api/album/albumUpdate',
    method: 'post',
    data,
  })
}

/*活动管理*/
//活动条件查询
export function activitySelectBy(data) {
  return request({
    url: '/api/activity/activitySelectBy',
    method: 'post',
    data,
  })
}
//活动删除
export function activityDeleteByIds(data) {
  return request({
    url: '/api/activity/activityDeleteByIds',
    method: 'post',
    data,
  })
}
//活动添加
export function activityAdd(data) {
  return request({
    url: '/api/activity/activityAdd',
    method: 'post',
    data,
  })
}
//活动修改
export function activityUpdate(data) {
  return request({
    url: '/api/activity/activityUpdate',
    method: 'post',
    data,
  })
}

/*类别管理*/
//类别条件查询
export function classificationSelectBy(data) {
  return request({
    url: '/api/classification/classificationSelectBy',
    method: 'post',
    data,
  })
}
//类别删除
export function classificationDeleteByIds(data) {
  return request({
    url: '/api/classification/classificationDeleteByIds',
    method: 'post',
    data,
  })
}
//类别添加
export function classificationAdd(data) {
  return request({
    url: '/api/classification/classificationAdd',
    method: 'post',
    data,
  })
}
//类别修改
export function classificationUpdate(data) {
  return request({
    url: '/api/classification/classificationUpdate',
    method: 'post',
    data,
  })
}

/*行业领域管理*/
//行业领域条件查询
export function occupationalSelectBy(data) {
  return request({
    url: '/api/occupational/occupationalSelectBy',
    method: 'post',
    data,
  })
}
//行业领域删除
export function occupationalDeleteByIds(data) {
  return request({
    url: '/api/occupational/occupationalDeleteByIds',
    method: 'post',
    data,
  })
}
//行业领域添加
export function occupationalAdd(data) {
  return request({
    url: '/api/occupational/occupationalAdd',
    method: 'post',
    data,
  })
}
//行业领域修改
export function occupationalUpdate(data) {
  return request({
    url: '/api/occupational/occupationalUpdate',
    method: 'post',
    data,
  })
}

/*学历管理*/
//学历条件查询
export function educationBackgroundSelectBy(data) {
  return request({
    url: '/api/educationBackground/educationBackgroundSelectBy',
    method: 'post',
    data,
  })
}
//学历删除
export function educationBackgroundDeleteByIds(data) {
  return request({
    url: '/api/educationBackground/educationBackgroundDeleteByIds',
    method: 'post',
    data,
  })
}
//学历添加
export function educationBackgroundAdd(data) {
  return request({
    url: '/api/educationBackground/educationBackgroundAdd',
    method: 'post',
    data,
  })
}
//学历修改
export function educationBackgroundUpdate(data) {
  return request({
    url: '/api/educationBackground/educationBackgroundUpdate',
    method: 'post',
    data,
  })
}

//获取类别 行业领域
export function classificationSelectView(data) {
  return request({
    url: '/api/classification/classificationSelectView',
    method: 'post',
    data,
  })
}
export function occupationalSelectView(data) {
  return request({
    url: '/api/occupational/occupationalSelectView',
    method: 'post',
    data,
  })
}

//获取 学历
export function educationBackgroundSelectView(data) {
  return request({
    url: '/api/educationBackground/educationBackgroundSelectView',
    method: 'post',
    data,
  })
}

//置顶操作
// 活动
export function activityPostTop(data) {
  return request({
    url: '/api/activity/activityPostTop',
    method: 'post',
    data,
  })
}
// 互助
export function helpPostTop(data) {
  return request({
    url: '/api/help/helpPostTop',
    method: 'post',
    data,
  })
}
// 相册
export function albumPostTop(data) {
  return request({
    url: '/api/album/albumPostTop',
    method: 'post',
    data,
  })
}
// 资讯
export function newsPostTop(data) {
  return request({
    url: '/api/news/newsPostTop',
    method: 'post',
    data,
  })
}

//审核操作
// 活动
export function activityExamine(data) {
  return request({
    url: '/api/activity/activityExamine',
    method: 'post',
    data,
  })
}
// 互助
export function helpExamine(data) {
  return request({
    url: '/api/help/helpExamine',
    method: 'post',
    data,
  })
}
// 相册
export function albumExamine(data) {
  return request({
    url: '/api/album/albumExamine',
    method: 'post',
    data,
  })
}

// 数据可视化
//类别饼图
export function classificationPie(data) {
  return request({
    url: '/api/classification/classificationPie',
    method: 'post',
    data,
  })
}
//曲线图 访问量
export function visitQuantity(data) {
  return request({
    url: '/api/visit/visitQuantity',
    method: 'post',
    data,
  })
}
//柱形图 授权数
export function authorizationQuantity(data) {
  return request({
    url: '/api/authorization/authorizationQuantity',
    method: 'post',
    data,
  })
}

//评论
export function commentToSelectBy(data) {
  return request({
    url: '/api/comment/commentToSelectBy',
    method: 'post',
    data,
  })
}

export function replySelectBy(data) {
  return request({
    url: '/api/comment/replySelectBy',
    method: 'post',
    data,
  })
}
//评论删除
export function commentToDeleteByIds(data) {
  return request({
    url: '/api/comment/commentToDeleteByIds',
    method: 'post',
    data,
  })
}

export function replyDeleteByIds(data) {
  return request({
    url: '/api/comment/replyDeleteByIds',
    method: 'post',
    data,
  })
}
